//
//  CoolAnimation.h
//  CoolFramework
//
//  Created by Felix on 12-4-20.
//  Copyright (c) 2012年 FelixApp. All rights reserved.
//

#import <Foundation/Foundation.h>

@class MBProgressHUD;
@interface CoolAnimation : NSObject {
    UILabel         *bubbleMsgLabel_;
}

//显示gif等待
+ (void)showWaitingViewWithGifInView:(UIView*)view;
+ (void)showWaitingViewWithGifInView:(UIView*)view afterDelay:(NSTimeInterval)delay;
+ (void)showWaitingViewWithGifInView:(UIView*)view withText:(NSString*)text afterDelay:(NSTimeInterval)delay;
//关闭gif等待
+ (void)hideWaitingViewWithGifFromView:(UIView*)view;

///////////////////////

//显示等待窗口,放在view上
+ (void)showWaitingViewInView:(UIView*)view;
+ (void)showWaitingViewInView:(UIView*)view color:(UIColor*)color;
//延时显示等待窗口,放在view上
+ (void)showWaitingViewInView:(UIView*)view afterDelay:(NSTimeInterval)delay;
//显示等待窗口,可以指定窗口文字text,和细节文字(显示在等待窗口底部),可以在窗口显示自定义的界面customView
+ (void)showWaitingViewInView:(UIView*)view withText:(NSString*)text detailText:(NSString*)detailText customView:(UIView*)customView;
//显示等待窗口,可以指定窗口文字text,和细节文字(显示在等待窗口底部),可以在窗口显示自定义的界面customView,可以设置延时显示delay
+ (void)showWaitingViewInView:(UIView*)view withText:(NSString*)text detailText:(NSString*)detailText customView:(UIView*)customView afterDelay:(NSTimeInterval)delay;
+ (void)showWaitingViewInView:(UIView*)view withText:(NSString*)text detailText:(NSString*)detailText customView:(UIView*)customView color:(UIColor*)color;
//显示等待窗口,可以指定窗口文字text,和细节文字(显示在等待窗口底部),可以在窗口显示自定义的界面customView,可以设置延时显示delay,可以设置窗口消失延时时间hideDelay
+ (void)showWaitingViewInView:(UIView*)view withText:(NSString*)text detailText:(NSString*)detailText customView:(UIView*)customView afterDelay:(NSTimeInterval)delay hideAfterDelay:(NSTimeInterval)hideDelay;
+ (void)showWaitingViewInView:(UIView*)view withText:(NSString*)text detailText:(NSString*)detailText customView:(UIView*)customView afterDelay:(NSTimeInterval)delay hideAfterDelay:(NSTimeInterval)hideDelay color:(UIColor*)color;

+ (void)showWaitingViewInView:(UIView*)view withText:(NSString*)text detailText:(NSString*)detailText customView:(UIView*)customView afterDelay:(NSTimeInterval)delay hideAfterDelay:(NSTimeInterval)hideDelay color:(UIColor*)color yOffset:(float)yOffset;
//关闭view上的等待窗口
+ (void)hideWaitingViewFromView:(UIView*)view;

//为view增加阴影效果
+ (void)displayShadow:(BOOL)display ofView:(UIView*)view;
+ (void)displayShadow:(BOOL)display ofView:(UIView*)view shadowColor:(UIColor*)shadowColor;
+ (void)displayShadow:(BOOL)display ofView:(UIView*)view shadowColor:(UIColor*)shadowColor shadowRadius:(CGFloat)shadowRadius shadowOpacity:(CGFloat)shadowOpacity shadowOffset:(CGSize)shadowOffset;

//弹出气泡信息，不屏蔽手势操作，默认3秒后消失
+ (void)showBubbleMessage:(NSString*)message inView:(UIView*)view;
+ (void)showBubbleMessage:(NSString*)message inView:(UIView*)view xOffset:(float)xOffset yOffset:(float)yOffset;
//弹出气泡信息，不屏蔽手势操作，指定时间后消失，如果delay为0则不会消失，除非调用hideBubbleMessageViewInView:(UIView*)view
+ (void)showBubbleMessage:(NSString*)message inView:(UIView*)view hideAfterDelay:(NSTimeInterval)delay;
+ (void)showBubbleMessage:(NSString*)message inView:(UIView*)view hideAfterDelay:(NSTimeInterval)delay customView:(UIView*)customView xOffset:(float)xOffset yOffset:(float)yOffset;

//返回view中的气泡控件
+ (MBProgressHUD*)bubbleMessageHUDInView:(UIView*)view;

//隐藏弹出汽泡信息
+ (void)hideBubbleMessageViewInView:(UIView*)view;

//在view上显示表示暂无数据的控件，customText为nil时显示默认文字
+ (void)setNoContentViewInView:(UIView*)view hidden:(BOOL)hidden customText:(NSString*)customText;
+ (void)setNoContentViewInView:(UIView*)view hidden:(BOOL)hidden customText:(NSString*)customText frame:(CGRect)frame;

//在view递归寻找firstResponder返回，如没有则返回nil
+ (UIResponder*)firstResponderInView:(UIView*)view;
@end
